package drug

import (
	"Project/global"
	"Project/model/drugs"
)

type DrugMiddleService struct {
}

func (d *DrugMiddleService) AddDrugsMiddle(list []drugs.DrugsMiddle) error {
	err := global.GVA_DB.Debug().Create(&list).Error
	return err
}

func (d *DrugMiddleService) DeleteDrugMiddle(id int64) error {
	err := global.GVA_DB.Debug().Where("record_id=?", id).Delete(&drugs.DrugsMiddle{}).Error
	return err
}
